var path = require("path");
var webpack = require('webpack');
module.exports = {
    resolve: {
        extensions: [".js", ".jsx"]
    },
    entry: {
        react: ['react'],
        reactDom: ['react-dom']
    },
    output: {
        path: path.join(__dirname, "js"),
        filename: "MyDll.[name].js",
        library: "[name]_[hash]"
    },
    plugins: [
        new webpack.DllPlugin({
            context: __dirname,//官方的例子比较旧，没有这个会出错
            path: path.join(__dirname, "js", "[name]-manifest.json"),
            name: "[name]_[hash]"
        })
    ]
};